There are image correction apparatuses that have been typically used to calculate the correction amount that is used for correcting pixel values or the like from input images, such as input moving images and still images (e.g., television images) and to correct the input images in a high quality manner using the calculated correction amount.
With such image correction apparatuses, in principle, image correction (grayscale correction) is performed to darken an input image if the input image is too bright, and to brighten an input image if the input image is too dark. However, if the image correction is simply performed in this way on the basis of the brightness of the input image, an overall bright image is corrected such that it becomes an overall dark image due to the correction in which the image is simply darkened when the image is too bright; therefore, there may be a case in which the grayscale of the dark region in the image is corrupted (or a black defacement phenomenon in which a dark image becomes darker and less viewable). For example, when correction is simply performed, using brightness, with respect to an input image that includes wrinkles of black clothes that a person wears in the daytime, the wrinkles of the black clothes that the person wears in the daytime are underexposed, resulting in a low quality image.
In contrast, for example, when grayscale is not particularly included in a dark portion, such as shadows of a tunnel in a bright scene, there may be a case in which correction is preferably performed to darken the image (image sharpening, i.e., preventing a black floating phenomenon in which the black color is perceived as the white color). In either case, because a dark region in an overall bright image is a noticeable portion in the entire image, it is undesirable that a black floating phenomenon or black defacement phenomenon occurs in such a portion.
Accordingly, various technologies for correcting images in a high quality manner while preventing occurrence of a black floating phenomenon or a black defacement phenomenon in a dark region in a bright image, which is a problem as described above, are disclosed. For example, in Japanese Laid-open Patent Publication No. 2001-189863, an image correction apparatus is disclosed, in which a correction value is calculated on the basis of the number of pixels in a dark region in a bright image. Specifically, the image correction apparatus according to Japanese Laid-open Patent Publication No. 2001-189863 detects the brightness of an input image, calculates a correction amount on the basis of the number of pixels in a comparatively dark region (from zero to a prescribed threshold) in the input image detected as a bright image, and corrects the bright input image using the calculated correction amount.
However, with the above-described conventional technology, even when the images are corrected in a high quality manner, in some cases, occurrence of a black floating phenomenon or a black defacement phenomenon may not be prevented; therefore, there is a problem in that images may not be always corrected in a high quality manner. Specifically, the correction amount is determined on the basis of the number of pixels in an extremely dark region without taking into consideration the darkness of the dark region; therefore, depending on the darkness of the dark region, correction may sometimes be suitably performed, whereas grayscale of the slightly dark region may sometimes be lost (specifically, the grayscale of the dark region may sometimes be underexposed), and furthermore, in some cases a black floating phenomenon occurs in an extremely dark region.
As described above, when correction is performed by calculating the correction value on the basis of the number of dark pixels in the entire input image, the input image is corrected such that it is simply brightened or darkened. As a result, as illustrated in (1) in FIG. 14, if correction is performed to darken the input image when a slightly dark region is present in the input image, that slightly dark region contains, as illustrated in (2) in FIG. 14, an underexposed image (a black defacement phenomenon) in which information contained in the dark region is lost. Furthermore, as illustrated in (1) in FIG. 15, if correction is performed to brighten the input image when an extremely dark region is present in the input image, in the extremely dark region, as illustrated in (2) in FIG. 15, a portion of the originally dark region becomes brightened (a black floating phenomenon).
Specifically, if the magnitude of correction is determined on the basis of the number of pixels of the dark region (i.e., a region where a pixel value is equal to or less than a prescribed value), the magnitude of correction is large when the region is broad. However, if the region contains some portions having a different degree of darkness (lots of slightly dark regions/lots of extremely dark regions), a black floating or black defacement phenomenon may possibly occur because the magnitude of correction is too large or too small for a certain portion even when the portions are contained in the same dark region.